package com.laizt.client.testshare;

import jcifs.smb.SmbException;
import jcifs.smb.SmbFile;

import java.net.MalformedURLException;

public class TestShare {
    public static void main(String[] args) {
        //192.168.7.253
        SmbFile smbFile;
        try {
            //smb://xxx:xxx@192.168.2.188/testIndex/
            //xxx:xxx是共享机器的用户名密码
          //  String url = "D:\\N9M-TestTool";
    String url = "smb://10.21.10.5/testshare/";
         //   String url = "smb://cmes:semc@192.168.7.253/Routeway/TEST/6A-III-AV3/";



         //  String url="smb://LAPTOP-MD6RTF99/testshare/";
          //  String url="smb://127.0.0.1/testshare/";
          //  String url = "smb://DESKTOP-3J4VPFP/testshare/";
            SmbFile file = new SmbFile(url);
            file.exists();

        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (SmbException e) {
            e.printStackTrace();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
